package org.okcjug.december;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

import junit.framework.TestCase;

import org.junit.Test;

public class Collections1 extends TestCase
{
	private static String quote1 = "Mongo only pawn in game of life";
	private static String quote2 = "Badges, we don't need no stinking badges";
	private static String quote3 = "We struck down evil with the mighty sword of teamwork and the hammer of not bickering";
	private static String quote4 = "May the Schwartz be with you";
	private static String quote5 = "You can't handle the truth";
	
	private static String[] quoteList = new String[]{quote1, quote2, quote3, quote4, quote5};
	
	private static  List<String> movieQuotes = new ArrayList<String>();
	
	@Test 
	public void testSeeSomeStuff()
	{
		Collection<String> myCollection = new ArrayList<String>();
		
		System.err.println(myCollection.size());
		assertTrue("expected myCollection size to be greater than zero", 
				0 < myCollection.size());
	}
	
	public static List<String> getList()
	{
//		System.out.println("----entering doit----");
		
		if(!Collections.addAll(movieQuotes, quoteList))
		{
			System.err.println("addAll failed");
			return null;
		}

		printIt();
		
//		System.out.println("----leaving doit----");
		return movieQuotes;
	}

	private static void printIt() 
	{
		for (String quote : movieQuotes)
		{
			System.out.println(quote);
		}
	}

}















